home *** CD-ROM | disk | FTP | other *** search
/ Aminet 37 / Aminet 37 (2000)(Schatztruhe)[!][Jun 2000].iso / Aminet / comm / uucp / Mutt_040_uucp.lha / Mutt / PGP-Notes.txt < prev    next >
Text File  |  2000-02-27  |  7KB  |  246 lines

  1. $Id: PGP-Notes.txt,v 1.10 1999/11/23 19:17:38 roessler Exp $
  2.  
  3.              USING PGP FROM WITHIN MUTT
  4.  
  5.  
  6. WARNING: The configuration interface has completely changed as of
  7.          0.96.3!
  8.  
  9.  
  10.  
  11.                 USERS' GUIDE
  12.  
  13.  
  14. How do I use mutt with PGP, PGP5, or GnuPG?
  15. -------------------------------------------
  16.  
  17. Go to the contrib subdirectory of the source tree.  You'll find
  18. three files there, pgp2.rc, pgp5.rc, and gpg.rc.  These files
  19. contain ready-to-use configurations for using mutt with pgp2, pgp5,
  20. and gpg.
  21.  
  22. Include one of these files with your ~/.muttrc, and things should
  23. work out fine.
  24.  
  25. You may wish to verify that all paths and  the language parameters
  26. given to the PGP binaries match your needs.
  27.  
  28.  
  29.  
  30. Frequently Asked Questions and Tips
  31. -----------------------------------
  32.  
  33. Q: "People are sending PGP messages which mutt doesn't
  34.     recognize.  What can I do?"
  35.  
  36. Add the following lines to your ~/.procmailrc (you are
  37. using procmail, aren't you?):
  38.  
  39.            ------------------------------
  40.  
  41. ##
  42. ## PGP
  43. ##
  44.   
  45. :0
  46. * !^Content-Type: message/
  47. * !^Content-Type: multipart/
  48. * !^Content-Type: application/pgp
  49. {
  50.         :0 fBw
  51.         * ^-----BEGIN PGP MESSAGE-----
  52.         * ^-----END PGP MESSAGE-----
  53.         | formail \
  54.             -i "Content-Type: application/pgp; format=text; x-action=encrypt"
  55.  
  56.         :0 fBw
  57.         * ^-----BEGIN PGP SIGNED MESSAGE-----
  58.         * ^-----BEGIN PGP SIGNATURE-----
  59.         * ^-----END PGP SIGNATURE-----
  60.         | formail \
  61.             -i "Content-Type: application/pgp; format=text; x-action=sign"
  62. }
  63.  
  64.  
  65.            ------------------------------
  66.  
  67. For users of maildrop, "Mark Weinem"
  68. <mark.weinem@unidui.uni-duisburg.de> suggests the following recipe:
  69.  
  70.            ------------------------------
  71.  
  72. BPGPM="-----BEGIN PGP MESSAGE-----"
  73. EPGPM="-----END PGP MESSAGE-----"
  74. BPGPS="-----BEGIN PGP SIGNATURE-----"
  75. EPGPS="-----END PGP SIGNATURE-----"
  76.  
  77. if (!/^Content-Type: message/ && !/^Content-Type: multipart/ \
  78.     && !/^Content-Type: application\/pgp/)
  79. {    
  80. if (/^$BPGPM/:b && /^$EPGPM/:b)
  81.     xfilter "reformail -A 'Content-Type: application/pgp; format=text; \
  82.         x-action=encrypt'"
  83.  
  84. if (/^$BPGPS/:b && /^$EPGPS/:b)
  85.     xfilter "reformail -A 'Content-Type: application/pgp; format=text; \
  86.         x-action=sign'"
  87. }
  88.  
  89.            ------------------------------
  90.  
  91.  
  92.  
  93. Q: "I don't like that PGP/MIME stuff, but want to use the
  94.     old way of PGP-signing my mails.  Can't you include
  95.     that with mutt?"
  96.  
  97. No.  Application/pgp is not really suited to a world with
  98. MIME, non-textual body parts and similar things.  Anyway,
  99. if you really want to generate these old-style
  100. attachments, include the following macro in your ~/.muttrc
  101. (line breaks for readability, this is actually one line):
  102.  
  103.   macro compose S "Fpgp +verbose=0 -fast
  104.       +clearsig=on\ny^T^Uapplication/pgp; format=text;
  105.     x-action=sign\n"
  106.  
  107.  
  108.  
  109. Q: "I don't like all the ^Gs and various other verbosity
  110.     PGP is presenting me with."
  111.  
  112. Roland Rosenfeld <roland@spinnaker.rhein.de> has found a
  113. quite elegant solution to this problem: PGP has some
  114. pretty good foreign language support.  So we just
  115. introduce a language called "mutt" which contains empty
  116. strings for the messages we don't want to see.  To use
  117. this, copy either language.txt or language50.txt
  118. (depending on what PGP version you are using) to your
  119. $PGPPATH.  Make sure the PGP command formats pass "+language=pgp" to
  120. all the PGP binaries (but not to pgpring!).
  121.  
  122. For PGP 2.6, a German version called "muttde" is available
  123. as well.
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.                  BACKGROUND
  131.  
  132.  
  133. Auxiliary Programs
  134. ------------------
  135.  
  136. Mutt needs two auxiliary programs for its PGP support: pgpewrap and
  137. pgpring.
  138.  
  139.  
  140. 1. pgpring
  141.  
  142. pgpring is a key ring dumper.  It extracts information from PGP's
  143. binary key ring and emits it in an (almost) readable output format
  144. understood by mutt's key selection routines.  This output format
  145. mimics the one used by the GNU Privacy Guard (GPG).
  146.  
  147. You'll need this program with PGP 2 and PGP 5.
  148.  
  149. Command line options:
  150.  
  151.     -k <key ring>    Dump the contents of the key ring specified
  152.             as an argument to -k.
  153.             
  154.     -2, -5         Use the default key ring for PGP 2 or 5, 
  155.             respectively.
  156.             
  157.     -s        Dump the secret key ring.
  158.  
  159.  
  160.  
  161. 2. pgpewrap
  162.  
  163. This is a little shell script which does some command line munging:
  164. The first argument is a command to be executed.  When pgpewrap
  165. encounters a "--" (dash-dash) argument, it will interpret the next
  166. argument as a prefix which is put in front of all following
  167. arguments.
  168.  
  169. Example:
  170.  
  171.     pgpewrap pgpe file -- -r a b c
  172.  
  173. will execute:
  174.  
  175.     pgpe file -r a -r b -r c
  176.  
  177. This script is needed with PGP 5 and with GPG, since their command
  178. line interfaces can't be properly served by mutt's format mechanism.
  179.  
  180.  
  181.  
  182. The Configuration Interface
  183. ---------------------------
  184.  
  185. As usual within mutt, the configuration interface for the PGP
  186. commands relies on printf-like formats.  For all PGP commands, the
  187. following %-sequences are defined.
  188.  
  189.   %p    The empty string when no passphrase is needed,
  190.       the string "PGPPASSFD=0" if one is needed.
  191.  
  192.     This is mostly used in conditional % sequences.
  193.  
  194.   %f    Most PGP commands operate on a single file or a file
  195.       containing a message.  %f expands to this file's name.
  196.  
  197.   %s    When verifying signatures, there is another temporary file
  198.     containing the detached signature.  %s expands to this
  199.     file's name.
  200.  
  201.   %a    In "signing" contexts, this expands to the value of the
  202.     configuration variable $pgp_sign_as.  You probably need to
  203.     use this within a conditional % sequence.
  204.  
  205.   %r    In many contexts, mutt passes key IDs to pgp.  %r expands to
  206.     a list of key IDs.
  207.  
  208. The following command formats are defined:
  209.  
  210.   $pgp_decode_command    Decode application/pgp messages.  This
  211.               command operates with and without pass phrases.
  212.             
  213.   $pgp_verify_command    Verify a PGP/MIME signature.
  214.  
  215.   $pgp_decrypt_command    Decrypt a PGP/MIME encrypted MIME body.
  216.                This command always gets a pass phrase.
  217.  
  218.   $pgp_sign_command    Sign a PGP/MIME body.  This command always
  219.               gets a pass phrase.
  220.  
  221.  
  222.   $pgp_encrypt_sign_command Encrypt and sign a MIME body.  This
  223.               command always gets a pass phrase.
  224.             
  225.   $pgp_encrypt_only_command Encrypt a MIME body, but don't sign it.
  226.   
  227.   $pgp_import_command    Import PGP keys from a file.
  228.   
  229.   $pgp_export_command    Export PGP keys to a file.  The output must
  230.               be ASCII armored.
  231.             
  232.   $pgp_verify_key_command Check a public key. This is used from the
  233.               key selection menu.
  234.  
  235.   $pgp_list_secring_command List the secret keys matching some hints
  236.               given in %r.
  237.  
  238.   $pgp_list_pubring_command List the public keys matching some hints
  239.               given in %r.
  240.  
  241. The passphrase is always passed on stdin; all commands must send
  242. their output to stdout and stderr.
  243.  
  244.  
  245.  
  246.